const express = require('express')
const router = express.Router()
const { getBarChartData, getPieChartData, getLineChartData } = require('../../controller/apis/chartController')

// 导入JWT拦截中间件
const checkTokenMiddleware = require('../../middlewares/checkTokenMiddleware')

// 获取柱状图所需数据
router.get('/chart/bar', checkTokenMiddleware, getBarChartData)

// 获取饼图所需数据
router.get('/chart/pie', checkTokenMiddleware, getPieChartData)

// 获取折线图所需数据
router.get('/chart/line', checkTokenMiddleware, getLineChartData)

module.exports = router